﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

/// <summary>
/// 小陨石带 子弹
/// </summary>
public class AsteroidGun : CurveGun
{
    protected override Vector3 CaculPos(Transform firepoint)
    {
        return firepoint.position + Random.insideUnitSphere * 0.1f;
    }

    protected override Quaternion CaculRot(Transform firepoint,int total, int index)
    {
        var localpoint = RoleManager.Instance.localPlayer.transform.position;
        var target = Vector3.Normalize(localpoint - firepoint.position);
        firepoint.up = target;
        return firepoint.rotation * Quaternion.Euler(0, 0, (index - total / 2f)/ total * (angle + Random.Range(0, 10)));
    }

}
